package library

class Book {
	String author
        String title
        String description
        String isbn
        int minGrade
        int maxGrade
        String language
        String category
	static constraints = {
		author(blank:false)
                title(blank:false)
                description()
                isbn(matches: "^(97(8|9))?\\d{9}(\\d|X)\$")
                minGrade(blank:false, range: 0..6)
                maxGrade(blank:false, range: 0..6)
                language(blank:false)
                category(blank:false, inList:["General Leisure Reading","Reading Skills","Math Skills","Health","Science"])
	}
}
